import java.util.Scanner;

public class OJsss {
    public static void main(String[] args) {
        long a;
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLong()) {
            a = scanner.nextLong();
            long h = a / 100;
            long t = a % 100 / 10;
            long s = a % 10;
            if (h * h * h + t * t * t + s * s * s == a) {
                System.out.println("Yes");
            } else {
                System.out.println("no");
            }
        }
    }
}